from rest_framework.response import Response

class ApiResponse(Response):
    def __init__(self,code=100,msg='成功',result=None,status=None, headers=None, content_type=None,**kwargs):
        dic={
            'code':code,
            'msg':msg,
        }
        if result != None:
            dic['result']=result
        dic.update(kwargs)
        super().__init__(data=dic,status=status,headers=headers,content_type=content_type)